package com.mqconsume

import org.springframework.cloud.stream.annotation.EnableBinding
import org.springframework.cloud.stream.annotation.StreamListener
import org.springframework.cloud.stream.messaging.Sink

@EnableBinding(Sink::class)
class MyConsume {
    @StreamListener(Sink.INPUT)
    fun receive(data: Map<String, Any?>) {
        println("收到消息：${data["message"]}")
    }
}
